package com.wanyangproject.androidlearning.designMode.factory;

public class SimpleFactory {

    public static<T> Product creatProduct(Class<T> tClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
        Product product = (Product) Class.forName(tClass.getName()).newInstance();
        return product;
    }



    public interface Product{
        void create();
    }

}
